import * as React from "react";
import {PropTypes} from "react";
import { RegisterPage } from "../root";
import {OrgSelector} from '../team/index';
import {schema as ListSchema} from './list';
import {schema as createSchema} from './create';
import {schema as editSchema} from './edit';
import {schema as applySchema} from './apply';



RegisterPage({
    path: "claim_project",
    label: "项目认领",
    icon: "fa fa-bookmark",
    NavComponent: OrgSelector,
    NavComponentTest: ({user, location}) => user.type == 4,
    acl: 'claim_project',
    children: [
      {
        path: "list",
        label: "认领列表",
        schema: ListSchema,
        url: "/claim_project/list?org_id=${org_id}"
      },

      {
        path: "/claim_project/edit/:id",
        label: "修改项目",
        schema: editSchema
      },

      {
        path: "/claim_project/:id/apply",
        label: "认领管理",
        schema: applySchema
      },

      {
        path: "/claim_project/create",
        label: "创建项目",
        schema: createSchema,
        acl: 'project:create',
        url: "/claim_project/create?org_id=${org_id}"
      }
    ]
  });
